{extends file="../home.html"}
{block name="title"}{$head_title}{/block}

{block name="css"}
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/front/front_css/refresh_load.css?version={$version}"/>
<link href="__PUBLIC__/Css/front/css/massage.css?version={$version}" type="text/css" rel="stylesheet">
<style type="text/css">
#load_wrapper{
	margin-top: 2.2rem;
	background:  #F3F3F3;
}
#pullUp span{
	font-size: .6rem;
	color: #B4B4B4;
}
</style>
{/block}
{block name="content"}

	
	<div class="com_header">
		<a href="javascript:;" class="go_back"><i class="icon_back"></i></a>官方消息
	</div>
	{if $news_list}
	<!-- 列表 -->
	<div id="load_wrapper">
		<div id="scroller">
				<div class="info_list">
					<!-- 链接到详情页 -->
					{foreach from = $news_list item = this}
						<div class="msg_block">
							<a href="/FrontIndex/official_news_detail/article_id/{$this.article_id}" class="native_go">
								<h4 class="title">{$this.title}</h4>
								<p class="time">{$this.add_time}</p>
								<img src="{$this.path_img}?imageMogr2/auto-orient/imageslim" alt="">
							</a>
						</div>
					{/foreach}
				</div>

				<div id="pullUp">
					<span class="pullUpIcon"></span><span class="pullUpLabel">上拉加载...</span>
				</div>
		</div>
	</div>
	{else}
	<!-- 无内容显示 -->
	<div class="no-cout">
		<img src="/Public/Images/img/icon_news_noOfficial@3x.png" alt="">
		<p>还没有收到官方消息哦</p>
	</div>
	{/if}
{/block}
{block name="js"}
<script type="text/javascript" src="__PUBLIC__/Js/front/iscroll.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/front/js/information_load.js"></script>

<script>
	var total = parseInt('{$total}');
	var firstRow = parseInt('{$firstRow}');
	//解决图片高度产生的iscroll.refresh不准确产生的bug
	var imgList = document.getElementsByTagName('img');
	for(var i = 0 ; i < imgList.length ;i++){
	    var img = imgList[i];
	    img.onload = (function(img){
	        return function(){
	            myScroll.refresh();
	            img.onload = null;
	        }
	    })(img);
	}
</script>
{literal}
{/literal}
{/block}